const mutations = {
	/* 登录缓存 */
	setStorage(state, val) {
		wx.setStorageSync('userInfo', val)
		state.useInfo = val
	},
	//底部tabbar数组
	setTabBarSelect(state, e) {
		state.tabbarSelectIndex = e
	},
	//获取身份
	setUserType(state, e) {
		state.type = e
	},
	//缓存
	setVuexStorage(state, data) {

		if (data) {
			state=data
			uni.setStorageSync("vuexState", JSON.stringify(data));
		} else {
			if (uni.getStorageSync('vuexState')) {
				state = JSON.parse(uni.getStorageSync('vuexState'));
			}
		}
	}

}
export default mutations
